<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>新增安全检查表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../../../css/public.css" media="all"/>
    <link rel="stylesheet" href="../../common/zTreeStyle.css"/>
    <link rel="stylesheet" href="detail.css"/>
</head>
<body class="childrenBody" style="background: white;">
<div class="topsty">
    <div style="display: inline;"><span style="font-size: 15px;"><i class="layui-icon"
                                                                    style="color: #1E9FFF;margin:0 10px 0 30px;">&#xe65b;</i><span
            id="pageTitle"></span></span></div>
    <div class="backtit" style="top: -5px;">
        <div class="back_san"></div>
        <a onclick="history.go(-1)" class="layui-btn layui-btn-normal">返回列表页</a>
    </div>
    <div class="backtit" style="top: -5px;">
        <a class="layui-btn layui-btn-normal export_btn">导出Excel</a>
    </div>
</div>
<form class="layui-form" v-cloak="true">
    <table class="layui-table " lay-skin="nob" style="background: white;">
        <colgroup>
            <col width="10%">
            <col width="23%">
            <col width="10%">
            <col width="23%">
            <col width="10%">
            <col width="23%">
        </colgroup>
        <tbody>
        <tr>
            <td>
                <div class="layui-input-inline ftdl"><label class="fowei">单元</label></div>
            </td>
            <td>
                <div class="text_box">{{info.unit}}</div>
            </td>
            <td>
                <label class="fowei ftdl">清单名称</label>
            </td>
            <td style="padding-right: 0px;">
                <div class="text_box">{{info.inventory}}</div>
            </td>
            <td>
                <label class="fowei ftdl">制修订时间</label>
            </td>
            <td>
                <div class="text_box">{{info.dexisionTime}}</div>
            </td>
        </tr>
        <tr>
            <td>
                <label class="fowei ftdl">编号</label>
            </td>
            <td>
                <div class="text_box">{{info.numberNo}}</div>
            </td>
            <td>
                <label class="fowei ftdl">单位名称</label>
            </td>
            <td style="padding-right: 0px;">
                <div class="text_box">{{info.userEntId}}</div>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        </tbody>
    </table>
    <table class="layui-table " lay-skin="nob" style="background: white;">
        <colgroup>
            <col width="15%">
            <col width="33%">
            <col width="15%">
            <col>
            <col width="4%">
        </colgroup>
        <tbody id="addTable">
        <template v-for="items in lists">
            <tr id="item-0">
                <td class="layui-bg-green1">
                    <div class="layui-input-inline"><label class="item-nav">{{items.name}}</label></div>
                </td>
                <td colspan="3" class="layui-bg-green1"></td>
                <td></td>
            </tr>
            <template v-for="item in items.describeModels">
                <tr id="item-title-0">
                    <td>
                        <div class="layui-input-inline ftdl"><label class="fowei">可能性分析</label></div>
                    </td>
                    <td style="padding-right: 0px;">
                        <div class="input_box">{{item.probability}}</div>
                        <div class="select_box"></div>
                    </td>
                    <td><label class="fowei ftdl">频次分析</label></td>
                    <td>
                        <div class="input_box">{{item.frequency}}</div>
                        <div class="select_box"></div>
                    </td>
                    <td style="vertical-align: middle; padding:0px 9px;" id="item-title-0-rightBtn">

                    </td>
                </tr>

                <tr id="item-title-0">
                    <td>
                        <div class="layui-input-inline ftdl"><label class="fowei">后果分析</label></div>
                    </td>
                    <td style="padding-right: 0px;">
                        <div class="input_box">{{item.aftermath}}</div>
                        <div class="select_box"></div>
                    </td>
                    <td>
                        <label class="fowei ftdl">风险评估值
                            <div>D=L×E×C</div>
                        </label>
                    </td>
                    <td>
                        <span v-if="item.estimateNum<20">一般风险</span>
                        <span v-if="item.estimateNum>=20">较大风险</span>
                    </td>
                </tr>
                <tr class="green-box" id="item-content-0-0" v-for="it in item.riskInfos">
                    <td colspan="2" style="padding-right: 0px;padding-left: 8%;">
                        <div class="layui-col-md12 ctd ctd1 sectd">
                            <div class="layui-col-md12 ctdd">
                                <div class="layui-col-md2 ctdlb"><label>风险分类</label></div>
                                <div class="green_input">{{it.type}}</div>
                            </div>
                            <div class="layui-col-md12 ctdd">
                                <div class="layui-col-md2 ctdlb"><label>措施分类</label></div>
                                <div class="green_input">{{it.measure}}</div>
                            </div>
                            <div class="layui-col-md12">
                                <div class="layui-col-md2 ctdlb"><label>责任单位</label></div>
                                <div class="green_input">{{it.ent}}</div>
                            </div>
                        </div>
                    </td>
                    <td colspan="3" style="padding-left: 0px;padding-right: 0px;">
                        <div class="layui-col-md11 ctd ctd2">
                            <div class="layui-col-md11 ctdd">
                                <div class="layui-col-md2 ctdlb"><label>风险分析</label></div>
                                <div class="green_input">{{it.analyse}}</div>
                            </div>
                            <div class="layui-col-md11 ctdd">
                                <div class="layui-col-md2 ctdlb"><label>具体措施</label></div>
                                <div class="green_input">{{it.specific}}</div>
                            </div>
                            <div class="layui-col-md11">
                                <div class="layui-col-md2 ctdlb"><label>责任人</label></div>
                                <div class="green_input">{{it.responsible}}</div>
                            </div>
                            <div class="layui-col-md1" style="position: absolute;right: 5px;">
                            </div>
                        </div>
                    </td>
                </tr>
            </template>

        </template>
        </tbody>
    </table>
</form>
<script type="text/javascript" src="../../common/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript" src="../../common/config.js"></script>
<script type="text/javascript" src="../../../layui/layui.js"></script>
<script type="text/javascript" src="../../common/jquery.ztree.core.js"></script>
<script type="text/javascript" src="../../common/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="detail.js"></script>
<script>
    var app = new Vue({
        el: '.layui-form',
        data: {
            list: [],
            lists: [],
            info: {}
        },
        methods: {},
        created: function () {
            var checkId = getQueryVariable("id");
            var that = this;
            if (checkId != false) {
                $.ajax({
                    url: url + '/risk/getInfo',
                    dataType: 'json',
                    async: false,
                    type: "POST",
                    data: {
                        Token: salt,
                        id: checkId
                    },
                    success: function (data) {
                        if (data.code == 0) {
                            that.info = data.data;
                            that.lists = JSON.parse(data.data.info);
                        } else {
                            layer.msg(data.msg);
                        }
                    },
                    error: function (error) {
                        console.log("获取失败");
                    }
                });
            } else {
                setTimeout(function () {
                    layer.msg("详情id为空");
                    setTimeout(function () {
                        History.go(-1);
                    }, 1000);
                }, 1000);
            }
        },
    })
    $("body").click(function () {
        $("#applyUnitTree").hide();
    })
    $('#applyUnit').click(function () {
        return false;
    });
    $('#applyUnitTree').click(function () {
        return false;
    });
    function formrender() {
        layui.use('form', function () {
            var form = layui.form;
            form.render();
        });
    }


</script>
</body>

</html>